﻿using Joy.Erp.BasicArchives.Core;
using Joy.Erp.BasicArchives.ItemMasters;
using System;

namespace Joy.Erp.BasicArchives.Procurements
{
    /// <summary>
    /// 采购订单行
    /// </summary>
    public class PurchaseOrderLine : DocumentLineAggregateRoot, IChild
    {
        /// <summary>
        /// 采购订单
        /// </summary>
        public PurchaseOrder Document { get; set; }

        /// <summary>
        /// 料品
        /// </summary>
        public Guid ItemMasterId { get; set; }

        /// <summary>
        /// 料品
        /// </summary>
        public ItemMaster ItemMaster { get; set; }

        /// <summary>
        /// 料品编号
        /// </summary>
        public string ItemCode { get; set; }

        /// <summary>
        /// 料品名称
        /// </summary>
        public string ItemName { get; set; }

        /// <summary>
        /// 规格型号
        /// </summary>
        public string ItemSpec { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        public decimal Quantity { get; set; }

        /// <summary>
        /// 剩余数量
        /// </summary>
        public decimal RemainingQuantity { get; set; }

        /// <summary>
        /// 计量单位
        /// </summary>
        public Guid UnitId { get; set; }

        /// <summary>
        /// 计量单位
        /// </summary>
        public AuxiliaryUnit Unit { get; set; }

        /// <summary>
        /// 单价
        /// </summary>
        public decimal UnitPrice { get; set; }

        /// <summary>
        /// 交期
        /// </summary>
        public DateTime? DeliveryDate { get; set; }

        /// <summary>
        /// 最新交期
        /// </summary>
        public DateTime? NewDeliveryDate { get; set; }

        /// <summary>
        /// 供应商交期
        /// </summary>
        public DateTime? SupplierDeliveryDate { get; set; }

        /// <summary>
        /// 要求到货日期
        /// </summary>
        public DateTime? RequireDeliveryDate { get; set; }
    }
}
